package com.gxg.entities;

import javax.validation.constraints.Email;
import javax.validation.constraints.Size;
import org.json.JSONObject;

public class User
{
  private String id;
  private String password;
  private String name;
  private String sex;
  @Email
  private String email;
  @Size(min=11, max=11)
  private String tel;
  private String role;
  
  public String getPassword()
  {
    return this.password;
  }
  
  public void setPassword(String password)
  {
    this.password = password;
  }
  
  public String getId()
  {
    return this.id;
  }
  
  public void setId(String id)
  {
    this.id = id;
  }
  
  public String getName()
  {
    return this.name;
  }
  
  public void setName(String name)
  {
    this.name = name;
  }
  
  public String getSex()
  {
    return this.sex;
  }
  
  public void setSex(String sex)
  {
    this.sex = sex;
  }
  
  public String getEmail()
  {
    return this.email;
  }
  
  public void setEmail(String email)
  {
    this.email = email;
  }
  
  public String getTel()
  {
    return this.tel;
  }
  
  public void setTel(String tel)
  {
    this.tel = tel;
  }
  
  public String getRole()
  {
    return this.role;
  }
  
  public void setRole(String role)
  {
    this.role = role;
  }
  
  public String toString()
  {
    JSONObject jsonObject = new JSONObject();
    jsonObject.accumulate("id", this.id);
    jsonObject.accumulate("password", this.password);
    jsonObject.accumulate("sex", this.sex);
    jsonObject.accumulate("name", this.name);
    jsonObject.accumulate("tel", this.tel);
    jsonObject.accumulate("email", this.email);
    jsonObject.accumulate("role", this.role);
    return jsonObject.toString();
  }
}
